local run = `1'
local i = `1'

*(sum up to div-year level (from BvD-division-year-ctry), append)
if "$spill" == "recompute" {
    *remove the recomputed spillovers before the next run
    do "${d}code/macrosim/destroy_spillovers.do" 
}

keep if year >= 1997 & year <= 2011
collapse (sum) pdepvar, by(year division)
gen run = $N * $batchrun + `run'
cap append using ${outd}/data/batchruns_${bname}.dta
sleep 1200
save ${outd}/data/batchruns_${bname}.dta, replace

